<template>
  <div>
    <el-container>
      <el-header class="header">5组601_车牌识别系统</el-header>
      <el-container>
        <el-aside width="200px" class="aside">
          <el-menu
            :default-openeds="['1']"
            background-color="#2c3e50"
            text-color="#ecf0f1"
            active-text-color="#1abc9c"
            router>
            <el-submenu index="1">
              <template slot="title"><h3><i class="el-icon-mobile-phone"></i> 车辆识别</h3></template>
              <el-menu-item-group>
                <el-menu-item index="/car/car1">
                  <span>车辆库显示</span>
                </el-menu-item>
                <el-menu-item index="/car/car2">
                  <span>车辆信息显示</span>
                </el-menu-item>
                <el-menu-item index="/car/car3">
                  <span>车辆抓拍</span>
                </el-menu-item>
                <el-menu-item index="/car/car4">
                  <span>车辆统计</span>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main class="main">
          <!-- 在这里展示视图 -->
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Main",
};
</script>

<style scoped lang="scss">
/* 顶部标题样式 */
.header {
  background-color: #34495e;
  color: #ecf0f1;
  text-align: center;
  line-height: 60px;
  font-size: 20px;
  font-weight: bold;
}

/* 左侧菜单栏样式 */
.aside {
  background-color: #2c3e50;
  color: #ecf0f1;
  border-right: 1px solid #bdc3c7;
}

.el-menu {
  width: 100%;
}

.el-submenu__title {
  font-size: 16px;
  color: #ecf0f1 !important;
}

.el-menu-item {
  font-size: 14px;
  color: #ecf0f1 !important;
  padding: 10px 20px;
  transition: background-color 0.3s ease;
}

.el-menu-item:hover {
  background-color: #34495e !important;
}

.el-menu-item.is-active {
  background-color: #1abc9c !important;
  color: #fff !important;
}

/* 主体内容区域样式 */
.main {
  background-color: #ecf0f1;
  padding: 20px;
  min-height: 100vh;
}

/* 消除滚动条 */
.el-aside::-webkit-scrollbar {
  display: none;
}
</style>
